package com.example.enterprise.api

import com.example.common.view.api.BaseApiService
import com.example.enterprise.entity.EnterpriseEntityItem
import com.example.enterprise.entity.MerchantAddParam
import com.example.enterprise.entity.MerchantEntityItem
import com.example.enterprise.model.EnterpriseResultData
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface EnterpriseApiService:BaseApiService {
    //企业
    @GET("/api/enterprise-profiles")
    suspend fun getEnterprise():EnterpriseResultData<List<EnterpriseEntityItem>>
    @GET("/api/enterprise-profiles/{id}")
    suspend fun getEnterpriseById(@Path("id") id:Int):EnterpriseResultData<EnterpriseEntityItem>
    //商家
    @POST("/api/merchant-applications")
    suspend fun postMerchant(@Body merchantAddParam: MerchantAddParam):EnterpriseResultData<MerchantEntityItem>
    @GET("/api/merchant-applications")
    suspend fun getMerchant():EnterpriseResultData<List<MerchantEntityItem>>
    @GET("/api/merchant-applications/{id}")
    suspend fun getMerchanById(@Path("id")id:Int):EnterpriseResultData<MerchantEntityItem>
}